package com.payment.ktb.adapter;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

import com.payment.ktb.R;
import com.payment.ktb.model.BankType;

import java.util.List;

/**
 * Created by admin on 2017/9/14.
 */

public class AdapterItem1Heigth40TextSize15 extends BaseAdapter {

    Context mContext;
    List<String> listData;

    public AdapterItem1Heigth40TextSize15() {
    }

    public AdapterItem1Heigth40TextSize15(Context mContext, List<String> listData) {
        this.mContext = mContext;
        this.listData = listData;
    }

    @Override
    public int getCount() {
        return listData.size();
    }

    @Override
    public Object getItem(int i) {
        return listData.get(i);
    }

    @Override
    public long getItemId(int i) {
        return i;
    }

    @Override
    public View getView(int i, View view, ViewGroup viewGroup) {

        ViewHolder viewHolder = null;

        if (view == null) {
            viewHolder = new ViewHolder();
            view = View.inflate(mContext, R.layout.adapter_item1_height45_textsize15,null);
            viewHolder.tv_adapter_item1_height40_textsize15 = (TextView) view.findViewById(R.id.tv_adapter_item1_height40_textsize15);
            view.setTag(viewHolder);
        }else {
            viewHolder = (ViewHolder) view.getTag();
        }
        viewHolder.tv_adapter_item1_height40_textsize15.setText(listData.get(i));
        return view;
    }

    class ViewHolder {

        TextView tv_adapter_item1_height40_textsize15;
    }


}
